Only try falling back to mkfifoat() if it is available#901
Conversation
If MKNOD_CREATES_FIFOS is not defined by configure (such as when cross-compiling), mkfifo() is available but mkfifoat() is not then compilation fails since 30656c5. Add a function check for mkfifoat and update the preprocessor conditional that wraps the call to it to reference HAVE_MKFIFOAT.
Compilation of v3.4.3 fails due to mkfifoat() being referenced but it is not available on Android until API level 23 (we are targeting 21 and above). Add patch (submitted at RsyncProject/rsync#901 for the consideration of upstream) to test specifically for the existence of mkfifoat() before trying to call it. Extend the build script and workflow to automatically apply patches in the root of the repository to the fetched source and reference the number of patches in the version number of the release.
Compilation of v3.4.3 fails due to mkfifoat() being referenced but it is not available on Android until API level 23 (we are targeting 21 and above). Add patch (submitted at RsyncProject/rsync#901 for the consideration of upstream) to test specifically for the existence of mkfifoat() before trying to call it. Extend the build script and workflow to automatically apply patches in the root of the repository to the fetched source and reference the number of patches in the version number of the release.
|
@ribbons I'm planning to have android builds as part of the main rsync repo, both normal builds and specific termux deb pkgs. Are you interested in helping with that? I'd like android to be tested in CI to ensure it doesn't bitrot |
|
@tridge That sounds great! Sure thing - happy to help (though with the caveat that I've not used Termux in anger before)! If you're happy to add another third-party action, I've had pretty good results using On the topic of this PR, do you think this is the right approach or is it getting the correct result the wrong way? I was a bit on the fence before but seeing your workaround in 8839314 made me think it might be better to adjust configure.ac to automatically set HAVE_SOCKETPAIR, MKNOD_CREATES_FIFOS and MKNOD_CREATES_SOCKETS when cross-compiling and the target is android ? That would then both fix this specific issue and give the correct feature detection for anyone downstream performing builds. |
If
MKNOD_CREATES_FIFOSis not defined by configure (such as when cross-compiling),mkfifo()is available butmkfifoat()is not then compilation fails since 30656c5.(I discovered this when trying to cross-compile v3.4.3 for Android, targeting API level 21 which provides
mkfifo()but notmkfifoat()).This PR adds a configure function check for
mkfifoatand updates the preprocessor conditional that wraps the call to it in syscall.c to referenceHAVE_MKFIFOAT.